package org.osami.syncagent.server;

import org.osami.syncagent.server.Message;
import org.osami.syncagent.server.TranslationException;

public interface Translator {
	/**
	 * Return the name of the translator.
	 * 
	 * @return The name of the translator.
	 */
	public String getName();
	
	/**
	 * Translates a String message into an OSAMI message.
	 * 
	 * @param aMsg
	 * @return Translated OSAMI Message.
	 * @throws TranslationException
	 */
	public abstract Message translate( String aMsg ) throws TranslationException;
	
	/**
	 * Translates an OSAMI Message into a String message.
	 * 
	 * @param aMsg
	 * @return Translated String message.
	 * @throws TranslationException
	 */
	public abstract String translate( Message aMsg ) throws TranslationException;
}	
	